<?php
class CDBMenuProvider{
	public $_result;
	public $_config=array();
	public $_dataPool;
	public $name;
	
	public function getDataArray(){
		if(!empty($this->_result)){
			$result=$this->_dataPool[$this->name]['items'];
			$this->_dataPool[$this->name]['label']=$this->name;
			foreach ($this->_result as $value){
				$result[$value->id]['label']=$value->title;
				$result[$value->id]['url']=Yii::app()->baseUrl.'/product/index/'.$value->id;
				$result[$value->id]['position']=array('left');
			}
			$this->_dataPool[$this->name]['items']=$result;
		}	
		return $this->_dataPool;
	}
}